package com.itheima.d02_thread_create;
/*
* 目标：
* 掌握创建线程二，实现runnable*/
public class Test {
    public static void main(String[] args) {
        MyRunnable runnable = new MyRunnable();
        Thread t1 = new Thread(runnable);
        t1.start();
        Thread t2 = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 10; i++) {
                    System.out.println("登录网页"+i);
                }
            }
        });
        t2.start();
        for (int i = 0; i < 10; i++) {
            System.out.println("main 主线程，播放音乐");
        }
    }
}
